<?php
namespace app\common;

use think\cache\Driver;
use my\JRedis;

class RedisCache extends Driver
{
    /*
     * 自定义的Cache类, 可在config/cache.php使用此缓存方法
     */

    public function has($key)
    {
        return JRedis::get($key);
    }
    
    public function get($key,$default = null)
    {
        return JRedis::get($key);
    }

    public function set($key, $value, $ttl = null)
    {
       return JRedis::set($key,$value,$ttl);
    }

    public function inc($key, $step = 1)
    {
        
    }

    public function dec($key, $step = 1)
    {
        
    }

    public function delete($key)
    {
        JRedis::delete($key);
    }

    public function clear()
    {
        
    }

    public function clearTag($keys=[])
    {
        
    }
}